import { createApp } from 'vue'
import App from '@/App.vue'
// 引用elementplus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// @ts-ignore=>去除这里的红色波浪线
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'virtual:svg-icons-register'
// 安装自定义插件
import gloablComponent from '@/components/index'
// 引入模板的全局的样式
import '@/styles/index.scss'
// 引入路由
import router from '@/router'
// 引入pinia
import pinia from '@/store'
// 引入路由鉴权
import './permisstion'
// 全局引入echarts
import * as ECharts from 'echarts'
import 'echarts-wordcloud'

const app = createApp(App)
app.use(ElementPlus, {
  locale: zhCn,
})
app.use(gloablComponent)
app.use(router)
app.use(pinia)
app.config.globalProperties.$ECharts = ECharts // 将echarts挂载在Vue实例上
app.mount('#app')
